package vn.aptech.leaveManagementSystem.business.model;

import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import vn.aptech.leaveManagementSystem.dao.DBManager;

public class Positions extends DBManager{
	public ResultSet getPosition(int idPos) throws SQLException
	//IDPosition,PositionName
	{
		getConn();
		String sql="{Call sp_getPosition(?)}";
		CallableStatement cs=conn.prepareCall(sql);
		cs.setInt(1, idPos);
		ResultSet rs=cs.executeQuery();
		return rs;
	}
	
	public ResultSet getPositionsList() throws SQLException
	//IDPosition,PositionName
	{
		getConn();
		String sql="{Call sp_getPositionsList}";
		CallableStatement cs=conn.prepareCall(sql);
		ResultSet rs=cs.executeQuery();
		return rs;
	}

}
